/**
 * 
 */
define(function (require, exports, module) {
	var EditGrid = require("editgrid");
	
    var instance = {
        initComponent: function (params,widget) {
        	$("#roomPersonalInfos").html("");
        	var grid = new EditGrid({
        		parentNode:"#roomPersonalInfos",
        		model:{
        			id : "checkInPerDetailGrid",
        			allowAdd : false,
        			columns:[{
        				name:"signUpRegister.personalInfo.name",
        				label:"姓名",
        			},{
        				name:"signUpRegister.personalInfo.idNumber",
        				label:"身份证号",
        			},{
        				name:"signUpRegister.personalInfo.sex.value",
        				label:"性别",
        				readonly:true,
        			},{
        				name:"signUpRegister.personalInfo.mobilePhone",
        				label:"联系电话",
        			},{
        				name : "signUpRegister.contactName",
        				label : "紧急联系人"
        			},{
        				name : "signUpRegister.contactPhone",
        				label : "紧急联系人电话"
        			},{
        				name:"descript",
        				label:"备注",
        				editor:{
							type:"text",
							placeholder: "请输入备注",
							onEdit:function(editor,rowIndex,rowData){
								editor.setValue(rowData.descript);
							},
							onChange:function(plugin,index,rowData){
								rowData.descript = plugin.getValue();
								grid.update(index,rowData);
							}
						}
						
        			}]
        		}
        	});
        	widget.set("checkInPerDetailGrid",grid);
        }
    };
    module.exports = instance;
});


